package com.example.pucha_xian.Dialog;

import android.app.Dialog;
import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ListView;

import com.example.pucha_xian.Adapter.BackPointsAdapter;
import com.example.pucha_xian.R;
import com.example.pucha_xian.common.PointVO;

import java.util.List;

public class BackPointsDialog extends Dialog {
    private ListView mlistView;
    public BackPointsDialog(List<PointVO> pointVOS, Context context, View layout, int style) {
        super(context, style);
        mlistView=layout.findViewById(R.id.lv_backpoints);
        BackPointsAdapter backPointsAdapter=new BackPointsAdapter(context, R.layout.listview_item_backpoints,pointVOS);
        mlistView.setAdapter(backPointsAdapter);

        setContentView(layout);
        Window window = getWindow();
        WindowManager.LayoutParams params = window.getAttributes();

        params.gravity = Gravity.CENTER;
        window.setAttributes(params);
    }
}
